﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.BusinessModel.OutPut
{
    /// <summary>
    /// 树形输出模型
    /// </summary>
    public class TreeOutPut
    {
        /// <summary>
        /// 主键
        /// </summary>
        public string? key { get; set; }

        /// <summary>
        /// 主键
        /// </summary>
        public string? value => key;

        /// <summary>
        /// 上级主键（没有为空字符）
        /// </summary>
        public string? pKey { get; set; }

        /// <summary>
        /// 公司key
        /// </summary>
        public string? CorporationKey { get; set; }

        /// <summary>
        /// 系统key
        /// </summary>
        public string? SystemKey { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public string? label { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }

        /// <summary>
        /// 是否禁用
        /// </summary>
        public bool disabled { get; set; }

        /// <summary>
        /// 是否叶子节点
        /// </summary>
        public bool isLeaf { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string? icon { get; set; }

        /// <summary>
        /// 节点类型
        /// </summary>
        public int nodeType { get; set; }

        /// <summary>
        /// 子节点
        /// </summary>
        public List<TreeOutPut> children { get; set; } = new List<TreeOutPut>();
    }
}
